﻿
using AutoMapper;
using RBAC.Api.Demain.ContentManagement;
using RBAC.Api.Demain.Entities;
using RBAC.Api.Writh.Command.ContentManagement;
using RBAC.Api.Writh.Command.Permissions;
using RBAC.Api.Writh.Command.Roles;
using RBAC.Api.Writh.Command.Users;

namespace RBAC.Api.Writh
{
    /// <summary>
    /// 配置映射
    /// </summary>
    public class AutoMapperFile:Profile
    {
        public AutoMapperFile()
        {
            #region RBAC表
            CreateMap<AddPermissionCommand, Permission>();
              CreateMap<UpdatePermissionCommand, Permission>();

              CreateMap<AddRoleCommand, Role>();
              CreateMap<UpdateRoleCommand, Role>();

              CreateMap<AddUserCommand, User>();
              CreateMap<UpdateUserCommand, User>();
            #endregion

            //=========================================================

            #region 内容管理
            //轮播图表
            CreateMap<AddCarouselChartCommand, CarouselChartModel>();
            //修改轮播图表
            CreateMap<UpdateCarouselChartCommand, CarouselChartModel>();
            //添加医院列表
            CreateMap<AddHospitalCommand, HospitalModel>();
            //修改医院
            CreateMap<UpdateHospitalCommand, HospitalModel>();
            //添加科室
            CreateMap<AddDepartmentCommand, DepartmentModel>();
            //修改科室
            CreateMap<UpdateDepartmentCommand, DepartmentModel>();
            #endregion


        }
    }
}
